package emailOption;

import emailOption.receiveEm;
import emailOption.sendEm;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/12/3 0003.
 * 此文件用于读取邮箱的收件箱并将各个信件中的文字内容存储在content字符串数组中，用于邻近识别运算
 */
public class getContent {
    public static ArrayList<receiveEm> testRe;
    public static String[] getCon() throws Exception {
        testRe =new receiveEm().Receive("15271901633@sina.cn","123456+-:");
        String []content=new String[testRe.size()];
        for (int i =0;i<testRe.size();i++){
            content[i]=testRe.get(i).getBodyText();
            String reg ="[^\u4e00-\u9fa5]";
            content[i]=content[i].replaceAll(reg,"");
        }
        return content;
    }
}
